//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package 力扣.题库.未分类;

public class demo_2269 {
    public demo_2269() {
    }

    public static void main(String[] args) {
        System.out.println(divisorSubstrings(26998721, 7));
    }

    public static int divisorSubstrings(int num, int k) {
        StringBuilder sb = new StringBuilder();
        sb.append(num);
        int sum = 0;

        for(int i = 0; i <= sb.length() - k; ++i) {
            int n1 = Integer.parseInt(sb.substring(i, i + k));
            if (n1 != 0 && num % n1 == 0) {
                ++sum;
            }
        }

        return sum;
    }
}
